//
//  PageContentDataSource.swift
//  PageNavigator
//
//  Created by 张奇 on 2025/8/15.
//

import UIKit

public class PageContainerDataSource: PageContainerViewControllerDataSource {
    
    private let viewControllers: [UIViewController]
    
    public init(viewControllers: [UIViewController]) {
        self.viewControllers = viewControllers
    }
    
    
    public func numberOfItems(in content: PageContainerViewController) -> Int {
        return self.viewControllers.count
    }
    
    public func pageContainerViewController(_ content: PageContainerViewController, viewControllerForItemAt index: Int) -> UIViewController {
        return self.viewControllers[index]
    }
    
}
